#ifndef _NEURON_H_
#define _NEURON_H_

#include "types.hpp"
#include "glHelper.hpp"

class Neuron;

struct connection{
    Neuron * pNeuron;
    float weight;
};

class Neuron {
    uint m_nConn;
    connection * m_connections;
    float m_threshold;
    float m_state;

public:
    Neuron ();
    ~Neuron ();
    void init (uint nConn, uint threshold);
    void setState (float state);
    float getState ();
    float setState ();
    void copy (Neuron * source);
    void mutate (int rate);
    void compute();
    connection * getConnections();
    inline uint getNumOfConn(){ return m_nConn; };
};

#endif
